home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / popen.zip / GETSWITC.C < prev    next >
C/C++ Source or Header  |  1988-03-08  |  290b  |  17 lines

  1. #include <stdio.h>
  2. #include <dos.h>
  3.  
  4. static    char    SW = 0;        /* DOS switch character, either '-' or '/' */
  5.  
  6. int
  7. getswitch()
  8. {
  9.    if (SW == 0) {
  10.       /* get SW using dos call 0x37 */
  11.       _AX = 0x3700;
  12.       geninterrupt(0x21);
  13.       SW = _DL;
  14.    }
  15.    return( SW & 0xFF );
  16. }
  17.